namespace JHT.EFMigrationTest.ClassLibrary1.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class ModifyTeacherInfo : DbMigration
    {
        public override void Up()
        {
            RenameTable(name: "dbo.ClassTeacher", newName: "TeacherClass");
            RenameColumn(table: "dbo.TeacherClass", name: "ClassInfoId", newName: "__mig_tmp__0");
            RenameColumn(table: "dbo.TeacherClass", name: "TeacherId", newName: "ClassInfoId");
            RenameColumn(table: "dbo.TeacherClass", name: "__mig_tmp__0", newName: "TeacherId");
            RenameIndex(table: "dbo.TeacherClass", name: "IX_ClassInfoId", newName: "__mig_tmp__0");
            RenameIndex(table: "dbo.TeacherClass", name: "IX_TeacherId", newName: "IX_ClassInfoId");
            RenameIndex(table: "dbo.TeacherClass", name: "__mig_tmp__0", newName: "IX_TeacherId");
        }
        
        public override void Down()
        {
            RenameIndex(table: "dbo.TeacherClass", name: "IX_TeacherId", newName: "__mig_tmp__0");
            RenameIndex(table: "dbo.TeacherClass", name: "IX_ClassInfoId", newName: "IX_TeacherId");
            RenameIndex(table: "dbo.TeacherClass", name: "__mig_tmp__0", newName: "IX_ClassInfoId");
            RenameColumn(table: "dbo.TeacherClass", name: "TeacherId", newName: "__mig_tmp__0");
            RenameColumn(table: "dbo.TeacherClass", name: "ClassInfoId", newName: "TeacherId");
            RenameColumn(table: "dbo.TeacherClass", name: "__mig_tmp__0", newName: "ClassInfoId");
            RenameTable(name: "dbo.TeacherClass", newName: "ClassTeacher");
        }
    }
}
